if [ "$2" == "src" ]; then
	mkdir "$1" 2> /dev/null
	cp Makefile README *.c *.h hashutils.texi hashutils.info "$1"
	exit 0
fi

if [ "$2" == "bin" ]; then
	D="$1-i386-linux"
	mkdir "$D" "$D/bin" "$D/lib" 2> /dev/null
	cp lib/* "$D/lib"
	cp hcksum hcomm hdiff huniq bcomm "$D/bin"
	cp COPYING README.binary hashutils.info "$D"
	exit 0
fi

echo "usage: $0 <name> <src|bin>"
exit 1
